#include <gtest/gtest.h>
#include <iostream>
#include <unordered_map>

class suitTest : public testing::Test
{
public:
    static void SetUpTestCase()
    {
        std::cout << "开始测试初始化\n";
    }
    static void TearDownTestCase()
    {
        std::cout << "开始回收\n";
    }
    void SetUp() override
    {
        std::cout << "_mymap开始初始化\n";
        _mymap.insert(std::make_pair<std::string,std::string>("Hello","你好"));
        _mymap.insert(std::make_pair<std::string,std::string>("Delete","删除"));
    }
    void TearDown() override
    {
        std::cout << "_mymap开始回收\n";
        _mymap.clear();
    }
    std::unordered_map<std::string,std::string> _mymap;
private:
};

TEST_F(suitTest,test1)
{
    _mymap.insert(std::make_pair("leiyou","你好"));
    ASSERT_EQ(_mymap.size(),2);
}

TEST_F(suitTest,test2)
{
    ASSERT_EQ(_mymap.size(),3);
}

int main(int argc,char* argv[])
{
    testing::InitGoogleTest(&argc,argv);
    RUN_ALL_TESTS();

    return 0;
}